Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing custom HTTP headers #17219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

douglas-raillard-arm
Copy link
Contributor

Enables passing custom HTTP headers to cloud functions, e.g.:

pl.scan_parquet('http://foobar.com/a/file.parquet', storage_options={'headers': ...})

Fixes #17197

TODO: The ConfigKey system used to parse storage options does not seem to have support for a mapping value. For now, the code takes <value> in 'headers': <value>' and passes it as the value of a "Foobar" header as PoC. Any idea on how best to support an actual Dict[HeaderName, HeaderValue] is welcome.

@douglas-raillard-arm
Copy link
Contributor Author

PR updated with suggested rustfmt and clippy fixes

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 17.02128% with 39 lines in your changes missing coverage. Please review.

Project coverage is 80.42%. Comparing base (b40be85) to head (d69c404).
Report is 206 commits behind head on main.

Files Patch % Lines
crates/polars-io/src/cloud/options.rs 17.39% 38 Missing ⚠️
crates/polars-io/src/cloud/object_store_setup.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17219      +/-   ##
==========================================
- Coverage   80.45%   80.42%   -0.04%     
==========================================
  Files        1484     1484              
  Lines      195594   195634      +40     
  Branches     2778     2778              
==========================================
- Hits       157368   157331      -37     
- Misses      37714    37791      +77     
  Partials      512      512              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@douglas-raillard-arm
Copy link
Contributor Author

PR updated with fixes for TOML lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom HTTP headers in pl.scan_parquet()
1 participant